#include "mainwindow.h"
#include "ui_mainwindow.h"


MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::paintEvent(QPaintEvent *event)
{
    Q_UNUSED(event);
    QPainter painter(this);
    QPen pen;
    pen.setStyle(Qt::PenStyle::SolidLine);
    pen.setColor(Qt::GlobalColor::green);
    QBrush brush;
    brush.setStyle(Qt::BrushStyle::SolidPattern);
    brush.setColor(Qt::GlobalColor::green);
    painter.setPen(pen);
    painter.setBrush(brush);

    painter.drawRect(QRect(QPoint(0, 0), this->size()));
}

//void MainWindow::paintEvent(QPaintEvent *event)
//{
//    ui->widget->move(initPoint);
//}
